package com.zl.controller;

import com.zl.model.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ZLL
 * @date create in 2018/04/26
 */
@RestController
@RequestMapping("/user")
public class UserController {



    @RequestMapping("/test1")
    public void testUser(String id) throws Exception {
        System.out.println(id);

        throw new Exception("我的一个测试异常");
    }


    @RequestMapping("/user2")
    public Object getUser(long l) {

        System.out.println(l);

        return new User(1,"sssssssss");
    }
}
